cssimage: Scale images to contain, not cover
authorBenjamin Otte <otte@redhat.com>
Fri, 13 Jan 2017 02:28:34 +0000 (03:28 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 13 Jan 2017 02:38:36 +0000 (03:38 +0100)
commita06b1ea1baecf6f0211726e901af93995f01a923
tree4efa20db1b6fd372ab7113cb5968e7336f42e06f
parentb58de2d16cbb1b4e8fbdb6aac9d73deb887650e9
cssimage: Scale images to contain, not cover

Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
gtk/gtkcssimage.c
testsuite/reftests/Makefile.am
testsuite/reftests/css-image-aspect-ratio.css [new file with mode: 0644]
testsuite/reftests/css-image-aspect-ratio.ref.ui [new file with mode: 0644]
testsuite/reftests/css-image-aspect-ratio.ui [new file with mode: 0644]